tools/ocaml: register the ocaml exception so it can be used at the C level.
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 13 Jul 2010 18:27:33 +0000 (19:27 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 13 Jul 2010 18:27:33 +0000 (19:27 +0100)
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
tools/ocaml/libs/xl/xl.ml
tools/ocaml/libs/xl/xl.mli

index 0f665aebfe094f3836ca4dd2b0daa218faa349ed..1e3642fe4867e016e123d1e4ad4beba7cc5c8e25 100644 (file)
@@ -13,6 +13,8 @@
  * GNU Lesser General Public License for more details.
  *)
 
+exception Error of string
+
 type create_info =
 {
        hvm : bool;
@@ -207,3 +209,5 @@ external domain_sched_credit_set : domid -> sched_credit -> unit = "stub_xl_sche
 external send_trigger : domid -> string -> int -> unit = "stub_xl_send_trigger"
 external send_sysrq : domid -> char -> unit = "stub_xl_send_sysrq"
 external send_debug_keys : domid -> string -> unit = "stub_xl_send_debug_keys"
+
+let _ = Callback.register_exception "xl.error" (Error "register_callback")
index 0f665aebfe094f3836ca4dd2b0daa218faa349ed..4193e59a6d17a4ddf4b2cda3f16a155fad9a1806 100644 (file)
@@ -13,6 +13,8 @@
  * GNU Lesser General Public License for more details.
  *)
 
+exception Error of string
+
 type create_info =
 {
        hvm : bool;